package jiyun.com.yiyanmeng;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.CookieSyncManager;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import jiyun.com.yiyanmeng.http.MyWebView;

/**
 * Created by 裘翔 on 2019/11/11.
 */

public class IntroFragment extends Fragment {
    private View view;
    private WebView mWb;
    private String url;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.item_intro, null);

        initView(view);

        return view;
    }

    private void initView(View view) {
        url = getArguments().getString("url");
        mWb = (WebView) view.findViewById(R.id.wb);
        mWb.loadUrl(url);
    }
}
